package com.boomsecret.classlocks;

import java.util.concurrent.locks.ReentrantLock;

/**
 * @author wangjinliang on 2019/1/21.
 */
public class LockDemo {
    public static void main(String[] args) {
        ReentrantLock lock = new ReentrantLock();
        lock.lock();
        try {
            System.out.println("test lock");
        } catch (Exception e) {
        } finally {
            lock.unlock();
        }
    }
}
